import axiosServer from "@/utils/request";
// 获取规则
export const getGuize = () => {
  return axiosServer({
    method: "get",
    url: "/api/festivalAwardCurrency/findById",
  });
};
// 修改规则函数
export const xgActivity = (
  name,
  currencyId,
  currencyName,
  rules,
  startTime,
  endTime,
  amount,
  rare
) => {
  return axiosServer({
    method: "post",
    url: "/api/festivalAwardCurrency/update",
    data: { name, currencyId, currencyName, rules, startTime, endTime, amount, rare },
  });
};
/**
获取奖品表单
 */
export const getJiugonggeData = () => {
  return axiosServer({
    method: "get",
    url: "/awardNine/listData",
  });
};

// 修改奖品
export const ModifyJiangping = (id, itemId, name, num, myProbability) => {
  return axiosServer({
    method: "post",
    url: "/awardNine/update",
    data: { id, itemId, name, num, myProbability }
  });
};

// 记录分页查询
export const postListData = (page, limit, userId, nickname, awardId) => {
  return axiosServer({
    method: "get",
    url: "/awardLogNine/listData",
    params: { page, limit, userId, nickname, awardId }
  });
};

